This session demonstrates two different ways to specify the location of an Element so that some action can be executed on it:
Example 1: "SwipeWhileNotFound" command - Swipe to search for an element or text.
Example 2: "ElementListSelect" command - Select an element in a list (after first making the element visible).
For this example we'll use the eri-Bank application. We will go to the payment page, click on the countries list, and choose United-Kingdom (which is the not visible unless scrolling down)
Preparations:
Step 1: We will do a native record on the eri-Bank application as explained in session 1 - "Getting Gtarted iOS / Android / WindowsPhone "
Step 2: Change the last command to "Click" on 'Make Payment' Object (instead of "VerifyElement").
Click on the relevant step
Expand the commands drop-down list
Choose the wanted command (in this case - 'Click')
This is the new script:
Step 3: Add a step - Click on 'Select' button (to open the countries list)
Note: We will do a dynamic NATIVE extraction
Click on the "Object Spy" icon button.
Click on the 'Select' button.
Right-click on one of the Object's properties to Add a command -> choose 'Click'.
The Countries list will now appear on the device and the script will appear in the script area:
Now we are ready to add the command that will find the country we want and then click on it - the country will be United-Kingdom'
"SwipeWhileNotFound" command
"ElementListSelect" command